Skip to content

fix(composer): keep model rows on one line and truncate long names - #1717

Merged
vastsa merged 1 commit into
mainfrom
fix/model-menu-single-line-truncate
Oct 16, 2026
Merged

vastsa merged 1 commit into
mainfrom
fix/model-menu-single-line-truncate

Conversation

@vastsa

@vastsa vastsa commented Oct 16, 2026

Copy link
Copy Markdown
Owner

问题

输入框的模型列表里,模型名过长时会换行,行高随名字长度变化,整列读起来参差;最近使用那几行的提供商名(WTQ Pool (CN) / Team / Wang)挤在右侧把名字压成两行。

改动

  • 模型行不再换行(flex-wrap: nowrap),名字超出可用宽度时以省略号截断。
  • 行尾的元信息(提供商、能力图标、上下文窗口)改为可收缩,提供商名先让位,自己也带省略号兜底。
  • 完整名称与 wire id 仍保留在行的 title 上,悬停即可看到。
  • 更新原有合同测试:它此前锁定的是「长名换行不截断」的旧行为,现改为断言单行 + 省略号契约。

验证

  • pnpm --filter @pi-desktop/desktop typecheck 通过
  • node --test test/*.test.mjs(apps/desktop)4020 通过 / 0 失败
  • biome check 改动文件通过

The model menu wrapped a long model name onto a second line, so a row's
height varied with its name and the list read unevenly. The name now takes
whatever width the row has left after its trailing markers and truncates
with an ellipsis beyond that.

The provider trailing each recent row also yields width before the model
name, so a long name is not the only part that has to survive on the shared
line. The full name and the wire id stay available as the row's title.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 9613f3b into main Oct 16, 2026
12 of 14 checks passed
@vastsa
vastsa deleted the fix/model-menu-single-line-truncate branch October 16, 2026 10:49

This branch was previously deployed

1 inactive deployment
Preview — 15e81f6c Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants